home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 1996 May / cd joy 71No13.iso / pc / demos / eurosoc / source / library / cgldef.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-12  |  7.1 KB  |  292 lines

  1. #ifndef __CGL_DEF__
  2. #define __CGL_DEF__
  3.      /*********************************************************************
  4.  
  5.      cgldef.h
  6.  
  7.      Copyright (c) Creative Technology Ltd. 1994-1995. All Rights Reserved.
  8.  
  9.      THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  10.      KIND,    EITHER EXPRESSED OR IMPLIED,  INCLUDING BUT NOT LIMITED TO THE
  11.      IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  12.      PURPOSE.
  13.  
  14.      *********************************************************************/
  15.  
  16. /*
  17.  * @@ SOURCE DOCUMENTATION
  18.  *
  19.  * TITLE    : cgldef.h
  20.  *
  21.  * VERSION    : 0.01
  22.  *
  23.  * DATE     : 1 December 1994
  24.  *
  25.  * AUTHOR    : Philip Teo
  26.  *              Toh Chin Kok
  27.  *              Burak Alp
  28.  *
  29.  * BRIEF    : This file includes all constants and marco used.
  30.  *
  31.  * @@ LOG CHANGE
  32.  * DATE         VERSION   REV           DESCRIPTION
  33.  * 13 Feb 95     1.0      Philip Teo   First library version
  34.  * 11 Mar 95     1.1      Philip Teo   Second library version
  35.  */
  36.  
  37. //====================//
  38. // CGL_SendStream      //
  39. //====================//
  40.  
  41. ////////////////////////
  42. // Stream Handling      //
  43. ////////////////////////
  44.  
  45. /////////////////////
  46. //    Operation Type //
  47. /////////////////////
  48. #define CGL_RENDER                   1
  49. #define CGL_COPY                   2
  50.  
  51. //////////////////////
  52. // Primitive Types    //
  53. //////////////////////
  54.  
  55. #define CGL_POINT                   (CGL_INT16) 0x0000
  56. #define CGL_LINE                   (CGL_INT16) 0x0100
  57. #define CGL_LINE_STRIP               (CGL_INT16) 0x0101
  58. #define CGL_LINE_LOOP               (CGL_INT16) 0x0102
  59. #define CGL_TRIANGLE               (CGL_INT16) 0x0200
  60. #define CGL_TRIANGLE_STRIP           (CGL_INT16) 0x0201
  61. #define CGL_TRIANGLE_FAN           (CGL_INT16) 0x0202
  62. #define CGL_QUAD                   (CGL_INT16) 0x0300
  63. #define CGL_QUAD_STRIP               (CGL_INT16) 0x0301
  64. #define CGL_RECTANGLE               (CGL_INT16) 0x0400
  65. #define CGL_SPAN_LINE               (CGL_INT16) 0x0501
  66. #define CGL_SPAN_VLINE               (CGL_INT16) 0x0502
  67.  
  68.  
  69.  
  70. /////////////////////////
  71. // Primitive Property  //
  72. /////////////////////////
  73.  
  74.  
  75. //////////////////
  76. //    Shading     //
  77. //////////////////
  78. #define CGL_GOURAUD                1
  79. #define CGL_FLAT                   0
  80.  
  81. //////////////////////////
  82. //    Stencil Read/Write //
  83. /////////////////////////
  84.  
  85. #define CGL_WRITE_ENABLE           1
  86. #define CGL_READ_ENABLE            2
  87.  
  88.  
  89. //===================//
  90. //    CGL_InitScreen     //
  91. //===================//
  92.  
  93. ///////////////////////
  94. //    Screen Reference //
  95. ///////////////////////
  96.  
  97. #define CGL_TOP_LEFT               0
  98. #define CGL_BOTTOM_LEFT            1
  99.  
  100. ///////////////////////
  101. //    Screen Mode      //
  102. ///////////////////////
  103.  
  104. // multisync monitor required
  105. #define CGL_M320x200x70Hz           0
  106. #define CGL_M320x240x60Hz           1
  107. #define CGL_M640x480x75Hz           2
  108. #define CGL_M800x600x75Hz           3
  109. #define CGL_M1024x768x75Hz           4
  110. #define CGL_M1280x1024x75Hz        5
  111. // standard SVGA range
  112. #define CGL_M640x480x72Hz           6
  113. #define CGL_M800x600x56Hz           7
  114. #define CGL_M800x600x60Hz           8
  115. #define CGL_M800x600x72Hz           9
  116. #define CGL_M1024x768x60Hz           10
  117. #define CGL_M1280x1024x57Hz        11
  118.  
  119. // standard VGA range
  120. #define CGL_M640x480x60Hz           13
  121. #define CGL_M640x400x70Hz           14
  122. #define CGL_M640x350x70Hz           15
  123.  
  124. ///////////////////////
  125. //    Color Order      //
  126. ///////////////////////
  127. #define CGL_RGB_MODE               1
  128. #define CGL_BGR_MODE               0
  129.  
  130.  
  131. ///////////////////////
  132. // Color Format      //
  133. ///////////////////////
  134.  
  135. #define CGL_CI8                    14
  136. #define CGL_RGB232                 11
  137. #define CGL_RGB2321                9
  138. #define CGL_RGB332                   5
  139. #define CGL_RGB4444                2
  140. #define CGL_RGB5551                1
  141. #define CGL_RGB8888                0
  142.  
  143. /////////////////////////////
  144. // Single/Double Buffering //
  145. /////////////////////////////
  146.  
  147. #define CGL_SINGLE                   1
  148. #define CGL_DOUBLE                   2
  149.  
  150. /////////////////////////////
  151. //    Stencil/Depth           //
  152. /////////////////////////////
  153.  
  154. #define CGL_D0S0                   0
  155. #define CGL_D16S0                   1
  156. #define CGL_D15S1                   2
  157.  
  158.  
  159. //===================================//
  160. // cglSetDepthMode/cglSetStencilMode //
  161. //===================================//
  162.  
  163. /////////////////////////////
  164. //    Depth/Stencil Test       //
  165. /////////////////////////////
  166.  
  167. #define CGL_NEVER                   0
  168. #define CGL_LESS                   1
  169. #define CGL_EQUAL                   2
  170. #define CGL_LESS_OR_EQUAL           3
  171. #define CGL_GREATER                4
  172. #define CGL_NOT_EQUAL               5
  173. #define CGL_GREATER_OR_EQUAL       6
  174. #define CGL_ALWAYS                   7
  175.  
  176. #define CGL_KEEP                   0
  177. #define CGL_RESET                   1
  178. #define CGL_REPLACE                2
  179. #define CGL_INVERT                   5
  180.  
  181. ///////////////////////
  182. // Buffer Type/Mask  //
  183. ///////////////////////
  184.  
  185. #define CGL_FRAME_BUFFER           0x10
  186. #define CGL_DEPTH_BUFFER           0x08
  187. #define CGL_STENCIL_BUFFER           0x04
  188.  
  189.  
  190. ////////////////////////
  191. // Buffer Operation   //
  192. ////////////////////////
  193. #define CGL_FRONT_TO_BACK          1
  194. #define CGL_BACK_TO_FRONT          2
  195.  
  196. #define CGL_FRONT_BUFFER           1
  197. #define CGL_BACK_BUFFER            2
  198. #define CGL_LOCAL_BUFFER           3
  199. #define CGL_TEXTURE_BUFFER         4
  200.  
  201. ///////////////////////////
  202. // Logical Operation     //
  203. ///////////////////////////
  204.  
  205. #define CGL_LOGICOP_CLEAR           0
  206. #define CGL_LOGICOP_AND            1
  207. #define CGL_LOGICOP_AND_NOT        2
  208. #define CGL_LOGICOP_COPY           3
  209. #define CGL_LOGICOP_NOT_AND        4
  210. #define CGL_LOGICOP_NOP            5
  211. #define CGL_LOGICOP_XOR            6
  212. #define CGL_LOGICOP_OR               7
  213. #define CGL_LOGICOP_NOR            8
  214. #define CGL_LOGICOP_NOT_XOR        9
  215. #define CGL_LOGICOP_INVERT           10
  216. #define CGL_LOGICOP_OR_NOT           11
  217. #define CGL_LOGICOP_NOT            12
  218. #define CGL_LOGICOP_NOT_OR           13
  219. #define CGL_LOGICOP_NAND           14
  220. #define CGL_LOGICOP_SET            15
  221.  
  222.  
  223. #define CGL_NO_BLEND               90
  224. #define CGL_BLEND_IMAGE            91
  225. #define CGL_BLEND_PIXEL            92
  226.  
  227. //===========================//
  228. // CGL_SetTextureFilter      //
  229. //===========================//
  230.  
  231. #define CGL_TEXTURE_DISABLE_FILTER    0
  232. #define CGL_TEXTURE_FILTER_TYPE_1    1
  233. #define CGL_TEXTURE_FILTER_TYPE_2    2
  234. #define CGL_TEXTURE_FILTER_TYPE_3    3
  235. #define CGL_TEXTURE_FILTER_TYPE_4    4
  236. #define CGL_TEXTURE_FILTER_TYPE_5    5
  237.  
  238. #define CGL_MODULATE_TEXTURE        0
  239. #define CGL_DECAL_TEXTURE            1
  240. #define CGL_COPY_TEXTURE            3
  241.  
  242. #define CGL_TEXTURE_CLAMP            0
  243. #define CGL_TEXTURE_REPEAT            1
  244. #define CGL_TEXTURE_MIRROR            2
  245.  
  246. //===========================//
  247. // CGL_SetPickRegion         //
  248. // CGL_SetExtentRegion         //
  249. //===========================//
  250.  
  251. ///////////////////////////////
  252. //    Query Control Parameters //
  253. ///////////////////////////////
  254.  
  255.  
  256. #define CGL_INSIDE_REGION            0x0
  257. #define CGL_OUTSIDE_REGION            0x1
  258.  
  259. #define CGL_EXCLUDE_CULL_PIXEL        0x0
  260. #define CGL_INCLUDE_CULL_PIXEL        0x2
  261.  
  262. #define CGL_EXCLUDE_DRAWN_PIXEL     0x4
  263. #define CGL_INCLUDE_DRAWN_PIXEL     0x0
  264.  
  265. #define CGL_EAGLE1_REV01            0x0001
  266. #define CGL_EAGLE1_REV02            0x0002
  267. #define CGL_GLINT300SX_REV01        0x0100
  268. #define CGL_GLINT300SX_REV02        0x0200
  269.  
  270. // Cursor  (CGL_DISABLE for disable cursor)
  271. #define CGL_32x32x3                 0x01
  272. #define CGL_32x32x2HL                0x02
  273. #define CGL_32x32x2                 0x03
  274. #define CGL_64x64x3                 0x05
  275. #define CGL_64x64x2HL                0x06
  276. #define CGL_64x64x2                 0x07
  277.  
  278. //////////////////////////////
  279. // MISCELLANEOUS            //
  280. //////////////////////////////
  281.  
  282. #define CGL_ENABLE                    1
  283. #define CGL_DISABLE                 0
  284.  
  285. //-- Interrupt
  286.  
  287. #define CGL_INTR_VRETRACE            0x0001
  288. #define CGL_INTR_SCANLINE            0x0002
  289. #define CGL_INTR_SWAPBUFFER         0x0100
  290.  
  291. #endif // __CGL_DEF__
  292.